<style>
  html,body{
    width:100%;
    height:100%;
    margin:0px;
  }
  .login-main {
    width:100%;
    height:100%;
    background: #cccccc;
  }
  .login-con {
    position: absolute;
    left: 50%;
    top: 50%;
    height: 260px;
    width: 260px;
    margin-top: -130px;
    margin-left: -130px;
    background: #fff;
  }
  .from-title {
    position: absolute;
    height: 40px;
    width: 100%;
    margin-top: 30px;
    text-align: center;
    font-size: 20px;
  }
  .login-from {
    position: absolute;
    height: 200px;
    width: 100%;
    margin-top: 80px;
    padding: 0px 20px 20px 20px;
  }
</style>
<template>
    <div class="login-main">
      <div class="login-con">
        <Button type="primary" @click="requestTest()">axios测试</Button>
      </div>
    </div>
</template>

<script>

  export default {
    methods: {
      requestTest() {
        this.$http.get('api/axiosTest').then(response => {
          alert(response.data);
        }, response => {
          // error callback
        })
      }
    }
  }
</script>


